package comp418.blingo;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
/**
 * 
 * @author Jingbang
 *
 */
public class language extends Activity {
	private Utility utility=null;
	private Button bt_english=null;
	private Button bt_japanese=null;
	private Button bt_cantonese=null;
	private Button bt_account=null;
	
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.language);
		utility=Utility.getUtility();
		
		
		bt_english = (Button) findViewById(R.id.english);
		bt_japanese = (Button) findViewById(R.id.japanese);
		bt_cantonese=(Button) findViewById(R.id.cantonese);
		bt_cantonese.setClickable(false);
		bt_japanese.setClickable(false);
		bt_account=(Button) findViewById(R.id.profile);
		bt_english.setOnClickListener(new bt_next());
		bt_account.setOnClickListener(new bt_profile());
		
	}
	
	class bt_next implements android.view.View.OnClickListener {

		public void onClick(View v) {
			// TODO Auto-generated method stub

			Intent intent=new Intent();
			String user=utility.getUsername();
			intent.putExtra("username", user);
			intent.setClass(language.this,question.class);
			
			language.this.startActivity(intent);

		}
	}
	
	class bt_profile implements android.view.View.OnClickListener {

		public void onClick(View v) {
			// TODO Auto-generated method stub

			Intent intent=new Intent();
			intent.setClass(language.this,userprofile.class);
			
			language.this.startActivity(intent);

		}
	}
	
}
